package com.digital.welcome.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.digital.welcome.entity.Dorm;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 韩
 */
@Mapper
@Repository
public interface DormMapper extends BaseMapper<Dorm> {

    List<String> selectDormNumber(String userName, String majorClass, String sex);

    List<Dorm> selectDormNumberAndRegion(String userName, String majorClass, String sex);

    List<Dorm> selectAllDormIdByChose(String region, String dormNumber);

    boolean insertDormByUser(String userName, String dormId);

    void updateChoose(String dormId);

    void setChooseNull(String dormId);

    Dorm selectDormByUserName(String userName);
}
